import {ElMessage, ElMessageBox} from "element-plus";

export class Message{
    public static success(content?:string){
        ElMessage.success(content)
    }
    public static error(content?:string){
        ElMessage.error(content)
    }
    public static warning(content?:string){
        ElMessage.warning(content)
    }
}

export class MessageBox{
    public static confirm_deleted(_then:Function,_catch?:Function,_finally?:Function){
        ElMessageBox.confirm(
            '确定要删除吗?',
            '删除警告',
            {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
            }
        ).then(()=>_then()).catch(()=>_catch).finally(()=>_finally);
    }
}